package adapt;

/**
 * @author 帅小伙
 * @date 2021/12/27
 * @description  将老师适应成学生
 */
public class TeacherAdapter implements Student{
    Teacher teacher;


    public TeacherAdapter(Teacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public void eat() {
        teacher.eat();
        System.out.println("老师和同学一样在食堂吃饭");
    }

    @Override
    public void learn() {
        teacher.work();
        System.out.println("老师也呆听我慧宝大人的教诲");
    }
}
